<layout name="layout" />

<if condition="$warehouseUsesOrg eq true">
<script src="{$uri}Public/Scripts/PSI/Warehouse/MainFormWithOrg.js?dt={$dtFlag}" type="text/javascript"></script>
<else />
<script src="{$uri}Public/Scripts/PSI/Warehouse/MainForm.js?dt={$dtFlag}" type="text/javascript"></script>
</if>
<script src="{$uri}Public/Scripts/PSI/Warehouse/EditForm.js?dt={$dtFlag}" type="text/javascript"></script>

<script>
    Ext.onReady(function(){
        var app = Ext.create("PSI.App", {
            userName: "{$loginUserName}"
        });

        
        <if condition="$warehouseUsesOrg eq true">
        	var warehouseUsesOrg = true;
        <else />
        	var warehouseUsesOrg = false;
        </if>

        if (warehouseUsesOrg) {
            app.add(Ext.create("PSI.Warehouse.MainFormWithOrg"));
        } else {
            app.add(Ext.create("PSI.Warehouse.MainForm"));
        }
        app.setAppHeader({
            title: "{$title}",
            iconCls: "PSI-fid1003"
            });
    });
</script>